package dvlp.jhlee.myhomeinventory.model;

import java.io.Serializable;
import java.util.Date;

import com.google.appengine.api.datastore.Key;

/**
 * テーブルの共通要素をラップするための基底クラス
 * @author 
 *
 */
public abstract class CommonModelBase implements Serializable {
    private static final long serialVersionUID = 1L;

    abstract public Key getKey();
    abstract public void setKey(Key key);

    abstract public Long getVersion();
    abstract public void setVersion(Long version);

    
    // **** 共通要素項目
    
    protected long id;

    protected Boolean wasDeleted;
    
    protected Date created;
    protected Date modified;

    // **** アクセッサ：共通要素項目
    
    public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }

    public Boolean getWasDeleted() {
        return wasDeleted;
    }
    public void setWasDeleted(Boolean wasDeleted) {
        this.wasDeleted = wasDeleted;
    }

    public Date getCreated() {
        return created;
    }
    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getModified() {
        return modified;
    }
    public void setModified(Date modified) {
        this.modified = modified;
    }
    
}
